package com.bestcem.xm.member.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.member.mq.message.SyncWechatAccountInfoMessage;
import com.bestcem.xm.member.mq.message.WechatMemberSyncMessage;
import com.bestcem.xm.member.mq.message.WechatOfficialAccountGrantedMessage;

/**
 * 微信同步相关
 *
 * @author yf.wang <yf.wang@idiaoyan.com>
 * @version V1.0
 * @date 2022/3/28
 */
public interface WechatService {

    /**
     * 发送消息
     *
     * @param message
     */
    void sendWxSyncMessage(WechatMemberSyncMessage message);


    /**
     * 同步微信粉丝
     *
     * @param message
     */
    void syncWxMember(WechatMemberSyncMessage message);

    /**
     * 答卷时授权获取微信账号信息
     *
     * @param message*/
    void syncWechatAccountInfo(SyncWechatAccountInfoMessage message);

    /**
     * 微信公众号授权
     *
     * @param wechatAccountInfoGrantedMessage
     */
    void syncWechatOfficialAccountGranted(WechatOfficialAccountGrantedMessage wechatAccountInfoGrantedMessage);

    /**
     * 发送消息
     *
     * @param orgId
     * @return
     */
    ServiceResult<Void> sendWxSyncMessage(String orgId);

    /**
     * 推送 同步联系人消息
     *
     * @return
     */
    void publishSyncMemberSlices();

    /**
     * 定时任务同步
     *
     * @param wechatMemberSyncMessage
     */
    void scheduleSyncWxMember(WechatMemberSyncMessage wechatMemberSyncMessage);

    /**
     * 发送消息
     *
     * @param wechatMemberSyncMessage
     */
    void sendWxScheduleSyncMessage(WechatMemberSyncMessage wechatMemberSyncMessage);
}
